<!doctype html>
<html lang="en">
{include file='public/header'}

<body>
    <!-- 顶部开始 -->
    <div class="container">
        <div class="logo"><a href="#">短剧总后台</a></div>
        <div class="left_open">
            <i title="展开左侧栏" class="iconfont">&#xe699;</i>
        </div>
        <ul class="layui-nav right" lay-filter="">
            <li class="layui-nav-item">
                <a href="javascript:;" id="admin_user_name"></a>
                <dl class="layui-nav-child">
                    <!-- 二级菜单 -->
                    <dd><a href="javascript:;" onclick="logout()">退出</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item to-index"><a href="/admin/index/index.html">首页</a></li>
        </ul>

    </div>
    <!-- 顶部结束 -->
    <!-- 中部开始 -->
    <!-- 左侧菜单开始 -->
    <div class="left-nav">
        <div id="side-nav">
            <ul class="layui-nav layui-nav-tree left_nav_tree">
                {volist name="menu_data" id="menu"}
                <li class="layui-nav-item">
                    <a href="javascript:;">{$menu['name']}</a>
                    <dl class="layui-nav-child">
                        {volist name="menu.children_menu_data" id="v"}
                            <dd tab-id="{$v['path']}"><a _href="{$v['path']}">{$v['name']}</a></dd>
                        {/volist}
                    </dl>
                </li>
                {/volist}
            </ul>
        </div>
    </div>
    <!-- <div class="x-slide_left"></div> -->
    <!-- 左侧菜单结束 -->
    <!-- 右侧主体开始 -->
    <div class="page-content">
        <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
            <ul class="layui-tab-title">
                <li class="home"><i class="layui-icon">&#xe68e;</i>我的桌面</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <iframe src="" frameborder="0" scrolling="yes" class="x-iframe" id="statistics_iframe"></iframe>
                </div>
            </div>
        </div> 
    </div>
    <div class="page-content-bg"></div>
    <!-- 右侧主体结束 -->
    <!-- 中部结束 -->
    <!-- 底部开始 -->
    <div class="footer">
        <div class="copyright">Copyright ©<script>document.write(new Date().getFullYear())</script> x-admin v2.3 All Rights Reserved</div>
    </div>
    <!-- 底部结束 -->

    <script> 
        if(adminMessage.rule_id==11){
            $('.home').hide();
            $('#statistics_iframe').attr('src','/admin/partnersNew/cooperaterCountNew.html?token='+token)
        }else if(adminMessage.rule_id==12){
            $('.home').hide();
            $('#statistics_iframe').attr('src','/admin/wechat_target/index?token='+token)
        }else{
     
            $('#statistics_iframe').attr('src','/admin/index/welcome.html?token='+token)
        }
        $('.logo').attr('src','/admin/index/index.html?token='+token)
        $('#admin_user_name').html(adminMessage.user_name)

        // 退出登录
        function logout(){
            Ajax('/admin/login/exitLogin',{}).then(data => {
                localStorage.removeItem('adminToken')
                localStorage.removeItem('adminMessage')
                layer.msg('退出成功!',{icon:1,time:1000},function () {
                    location.href='/admin/login/index';
                });
            });
        }
    </script>
</body>

</html>